home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / EDO Hack / source code / sources / EDOHack.c next >
Encoding:
C/C++ Source or Header  |  1997-06-28  |  1.4 KB  |  64 lines  |  [TEXT/CWIE]

  1. // --------------------------------------------------------------------------------------
  2. //  EDOHack.c
  3. //
  4. //  Written by:
  5. //        Don Arbow                 and Marc A. Raiser
  6. //      donarb@edo-inc.com            mraiser@edo-inc.com
  7. //
  8. //        EveryDay Objects, Inc.
  9. //        http://www.edo-inc.com
  10. //
  11. //    When:
  12. //     in one day - June 26, 1997
  13. //
  14. //  Description:
  15. //        This hack downloads a html file based upon the name of the program.  It
  16. //        then puts up a dialog that shows a list of all links in the file.  Double-
  17. //        clicking on an entry downloads that link and parses it and so on.  The
  18. //        program requires the InternetAccess extension, also known as SubWoofer.
  19. //        It is available from Apple's web site, do a search on "SubWoofer".
  20. // --------------------------------------------------------------------------------------
  21.  
  22. #include "EDOHack.h"
  23.  
  24. #include "HackEvents.h"
  25. #include "HackMenus.h"
  26. #include "HackWindows.h"
  27. #include "FetchParseURL.h"
  28.  
  29. Boolean done;
  30.  
  31. void main() {
  32.     
  33.     Str255 fileName = "\phttp://";
  34.     OSErr  err = noErr;
  35.         
  36.     short numMasters = 4;
  37.     
  38.     InitGraf(&qd.thePort);
  39.     InitFonts();
  40.     InitWindows();
  41.     InitMenus();
  42.     InitCursor();
  43.     TEInit();
  44.     FlushEvents(everyEvent, 0);
  45.     InitDialogs(nil);
  46.     
  47.     while (numMasters--)
  48.         MoreMasters();
  49.         
  50.     MaxApplZone();
  51.  
  52.     BuildMenuBars();
  53.     
  54.     err = ReturnAppName(fileName);
  55.     
  56.     CreateWindow(fileName);
  57.     QueryURL(fileName);
  58.     
  59.     done = false;
  60.  
  61.     while (!done) {
  62.         EventLoop();
  63.     }    
  64. }